################################################################################
##
##   Hack Title:		easyUCP
##   
##   Hack Author:		AmigaLink < Amiga@ms25.de > (Markus Schmidt) http://www.EssenMitFreude.info 
##			
################################################################################
## The following sites also contain the latest version of the MOD: 
## 
## http://www.AmigaLink.de
## http://www.phpBBhacks.com
## http://www.phpBB.de
## 
## Full support for the MOD can be obtained at: 
##
## http://www.AmigaLink.de
##  
################################################################################
##
##  The hack is released under the GPL License. 
##  The hack can be freely used, but not distributed, without permission.
##  Intellectual Property Rights are retained by the hack author(s) 
##  listed above.
##
################################################################################
#
#----------[ ENGLISH NOTE ]------------------------------
# 

It's easy to install other mods with Profile changes into the easyUCP!

With much Mod Installation Guides, for example the one of the Birthday Mod,
you have nothing to regard! Exept that the Changes in the profile_view_body.tpl
must made in the easyucp_body.tpl! :o)
(Some basic knowledge with HTML are required.)

With some Mod, e.g. Gender Mod, must watch out however that the changes in
usercp_register.php and/or in profile_add_body.tpl will done on the correct
place, which however also not is difficult!
For a better understanding, throw times a view into the attached add ons.

#
#----------[ DEUTSCHE INFO ]------------------------------
#

Es ist sehr einfach andere Mods mit Profilnderungen ins easyUCP zu integrieren!

Bei vielen Mod Installationsanletungen, wie z.B. die des Birthday Mods, gibt es
nichts zu beachten! Ausser das die nderungen der profile_view_body.tpl nun in
die easyucp_body.tpl eingefgt werden mssen! :o)
(Ein gewisses Grundwissen in HTML ist hierbei von nten.)

Bei einigen Mod, wie z.B. dem Gender Mod, muss man allerdings aufpassen das die
nderungen in der usercp_register.php und/oder in der profile_add_body.tpl an
er richtigen Stelle durchgefrt werden, was allerdings auch nicht schwierig ist!
Fr ein besseres Verstndnis, wirf mal einen Blick in die beigefgten add ons.

#
#----------[ BOTH LANGUAGES ]------------------------------
#
#
#----------[ OPEN ]-------------------------------------
#

\includes\usercp_register.php

#
#----------[ FIND ]-------------------------------------
#

			$sql = "UPDATE " . USERS_TABLE . "
				SET " . $username_sql . $passwd_sql . "user_email = '" . str_replace("\'", "''", $email) ."', user_icq = '" . str_replace("\'", "''", $icq) . "', user_website = '" . str_replace("\'", "''", $website) . "', user_occ = '" . str_replace("\'", "''", $occupation) . "', user_from = '" . str_replace("\'", "''", $location) . "', user_interests = '" . str_replace("\'", "''", $interests) . "', user_sig = '" . str_replace("\'", "''", $signature) . "', user_sig_bbcode_uid = '$signature_bbcode_uid', user_viewemail = $viewemail, user_aim = '" . str_replace("\'", "''", str_replace(' ', '+', $aim)) . "', user_yim = '" . str_replace("\'", "''", $yim) . "', user_msnm = '" . str_replace("\'", "''", $msn) . "', user_attachsig = $attachsig, user_allowsmile = $allowsmilies, user_allowhtml = $allowhtml, user_allowbbcode = $allowbbcode, user_allow_viewonline = $allowviewonline, user_notify = $notifyreply, user_notify_pm = $notifypm, user_popup_pm = $popup_pm, user_timezone = $user_timezone, user_dateformat = '" . str_replace("\'", "''", $user_dateformat) . "', user_lang = '" . str_replace("\'", "''", $user_lang) . "', user_style = $user_style, user_active = $user_active, user_actkey = '" . str_replace("\'", "''", $user_actkey) . "'" . $avatar_sql . "
				WHERE user_id = $user_id";
			if ( !($result = $db->sql_query($sql)) )
			{
				message_die(GENERAL_ERROR, 'Could not update users table', '', __LINE__, __FILE__, $sql);
			}

#
#----------[ NOTE / INFO ]------------------------------
#

Changes at this code must be accomplished now at the appropriate part
(consider comment line like e.g.// profiles info.) of the following codes.

nderungen an diesem Code mssen nun am entsprechendem Teil (beachte
Kommentarzeile wie z.B // Profile Info) folgenden Codes durchgefhrt werden.

#
#----------[ FIND ]-------------------------------------
#

// <!-- BEGIN easyUCP -->
			if ( isset($HTTP_GET_VARS['ucp_mode']) || isset($HTTP_POST_VARS['ucp_mode']) )
			{
				$ucp_mode = ( isset($HTTP_GET_VARS['ucp_mode']) ) ? $HTTP_GET_VARS['ucp_mode'] : $HTTP_POST_VARS['ucp_mode'];
				$ucp_mode = htmlspecialchars($ucp_mode);
			} 
/*
			$sql = "UPDATE " . USERS_TABLE . "
				SET " . $username_sql . $passwd_sql . "user_email = '" . str_replace("\'", "''", $email) ."', user_icq = '" . str_replace("\'", "''", $icq) . "', user_website = '" . str_replace("\'", "''", $website) . "', user_occ = '" . str_replace("\'", "''", $occupation) . "', user_from = '" . str_replace("\'", "''", $location) . "', user_interests = '" . str_replace("\'", "''", $interests) . "', user_sig = '" . str_replace("\'", "''", $signature) . "', user_sig_bbcode_uid = '$signature_bbcode_uid', user_viewemail = $viewemail, user_aim = '" . str_replace("\'", "''", str_replace(' ', '+', $aim)) . "', user_yim = '" . str_replace("\'", "''", $yim) . "', user_msnm = '" . str_replace("\'", "''", $msn) . "', user_attachsig = $attachsig, user_allowsmile = $allowsmilies, user_allowhtml = $allowhtml, user_allowbbcode = $allowbbcode, user_allow_viewonline = $allowviewonline, user_notify = $notifyreply, user_notify_pm = $notifypm, user_popup_pm = $popup_pm, user_timezone = $user_timezone, user_dateformat = '" . str_replace("\'", "''", $user_dateformat) . "', user_lang = '" . str_replace("\'", "''", $user_lang) . "', user_style = $user_style, user_active = $user_active, user_actkey = '" . str_replace("\'", "''", $user_actkey) . "'" . $avatar_sql . "
				WHERE user_id = $user_id";
			if ( !($result = $db->sql_query($sql)) )
			{
				message_die(GENERAL_ERROR, 'Could not update users table', '', __LINE__, __FILE__, $sql);
			}
*/
// Registration Info
			if ( $ucp_mode == 'ucp_require' || $ucp_mode == '' )
			{
			$sql = "UPDATE " . USERS_TABLE . "
				SET " . $username_sql . $passwd_sql . "user_email = '" . str_replace("\'", "''", $email) ."', user_active = $user_active, user_actkey = '" . str_replace("\'", "''", $user_actkey) . "'
				WHERE user_id = $user_id";
			  if ( !($result = $db->sql_query($sql)) )
			  {
				  message_die(GENERAL_ERROR, 'Could not update users table', '', __LINE__, __FILE__, $sql);
			  }
			}
// Profile Info
			if ( $ucp_mode == 'ucp_info' || $ucp_mode == '' )
			{
			$sql = "UPDATE " . USERS_TABLE . "
				SET user_icq = '" . str_replace("\'", "''", $icq) . "', user_website = '" . str_replace("\'", "''", $website) . "', user_occ = '" . str_replace("\'", "''", $occupation) . "', user_from = '" . str_replace("\'", "''", $location) . "', user_interests = '" . str_replace("\'", "''", $interests) . "',user_aim = '" . str_replace("\'", "''", str_replace(' ', '+', $aim)) . "', user_yim = '" . str_replace("\'", "''", $yim) . "', user_msnm = '" . str_replace("\'", "''", $msn) . "'
				WHERE user_id = $user_id";
			  if ( !($result = $db->sql_query($sql)) )
			  {
				  message_die(GENERAL_ERROR, 'Could not update users table', '', __LINE__, __FILE__, $sql);
			  }
			}
// Preferences
			if ( $ucp_mode == 'ucp_prefs' || $ucp_mode == '' )
			{
			$sql = "UPDATE " . USERS_TABLE . "
				SET user_viewemail = $viewemail, user_attachsig = $attachsig, user_allowsmile = $allowsmilies, user_allowhtml = $allowhtml, user_allowbbcode = $allowbbcode, user_allow_viewonline = $allowviewonline, user_notify = $notifyreply, user_notify_pm = $notifypm, user_popup_pm = $popup_pm, user_timezone = $user_timezone, user_dateformat = '" . str_replace("\'", "''", $user_dateformat) . "', user_lang = '" . str_replace("\'", "''", $user_lang) . "', user_style = $user_style
				WHERE user_id = $user_id";
			  if ( !($result = $db->sql_query($sql)) )
			  {
				  message_die(GENERAL_ERROR, 'Could not update users table', '', __LINE__, __FILE__, $sql);
			  }
			}
// Avatar
			if ( $ucp_mode == 'ucp_avatar' && $avatar_sql != '' || $ucp_mode == '' && $avatar_sql != '' )
			{
			$sql = "UPDATE " . USERS_TABLE . "
				SET " . substr($avatar_sql,2) . "
				WHERE user_id = $user_id";
			  if ( !($result = $db->sql_query($sql)) )
			  {
				  message_die(GENERAL_ERROR, 'Could not update users table', '', __LINE__, __FILE__, $sql);
			  }
			}
// Signature
			if ( $ucp_mode == 'ucp_signature' || $ucp_mode == '' )
			{
			$sql = "UPDATE " . USERS_TABLE . "
				SET user_sig_bbcode_uid = '$signature_bbcode_uid', user_sig = '" . str_replace("\'", "''", $signature) . "'
				WHERE user_id = $user_id";
			  if ( !($result = $db->sql_query($sql)) )
			  {
				  message_die(GENERAL_ERROR, 'Could not update users table', '', __LINE__, __FILE__, $sql);
			  }
			}
// <!-- END easyUCP -->

#
#----------[ OPEN ]-------------------------------------
#

\templates\subSilver\profile_add_body.tpl

#
#----------[ NOTE / INFO ]------------------------------
#

When changes in this file must be paid attention which they within the
UCP_Switches (e.g. <!-- BEGIN switch_ucp_info --> <!-- END switch_ucp_info -->)
take place.

Bei nderungen in dieser Datei muss darauf geachtet werden, das sie innerhalb
der UCP_Switches ( z.B. <!-- BEGIN switch_ucp_info --> <!-- END switch_ucp_info --> )
erfolgen.
